package service.impl;

import java.util.Collection;

import common.Constants;

import net.roarsoftware.lastfm.Album;
import net.roarsoftware.lastfm.Artist;
import net.roarsoftware.lastfm.Period;
import net.roarsoftware.lastfm.Track;
import net.roarsoftware.lastfm.User;
import service.UserInformationService;

public class UserInformationServiceImpl implements UserInformationService {

	private static UserInformationService instance;
	
	public static UserInformationService getInstance() {
		if (instance == null) {
			instance = new UserInformationServiceImpl(); 
		}
		return instance;
	}
	
	private UserInformationServiceImpl() {	}
	
	
	public Collection<User> getNeighbours(String user) {
		return User.getNeighbours(user, 10, Constants.API_KEY);
		
	}

	
	public Collection<Track> getRecentTracks(String user) {
		return User.getRecentTracks(user, 10, Constants.API_KEY);
		
	}


	
	public Collection<Album> getTopAlbums(String user) {
		return User.getTopAlbums(user, Period.THREE_MONTHS, Constants.API_KEY);
		
	}

	
	public Collection<Artist> getTopArtists(String user) {
		return User.getTopArtists(user, Period.THREE_MONTHS, Constants.API_KEY);
		
	}

}
